package top.heliming.dao;

import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.session.RowBounds;
import top.heliming.bean.User;

/**
 * description: //不配置接口扫描需要加@Mapper
 *
 * @author: heliming
 * @date:2019/05/22 上午 1:50
 */
@Mapper
public interface UserMapper extends tk.mybatis.mapper.common.Mapper<User>{
  @Select("<script>"
      + "SELECT * "
      + "FROM l_user a "
      + "<if test=\"key!=null and key!=''\">"
      + "WHERE a.name = #{key} "
      + "</if>"
      + "ORDER BY a.created ASC "
      + "<if test='startNo!=null and pageSize != null '>"
      + "LIMIT #{startNo},#{pageSize}"
      + "</if>"
      + "</script>")
  public List<User> list( @Param("startNo") Integer pageNo, @Param("pageSize") Integer pageSize,@Param("key") String key);

}